function InitializeSettings()
{
	variable settingsetref sbase
	variable settingsetref junk
	LavishSettings:AddSet[EQ Wanderbot]
	LavishSettings[EQ Wanderbot]:AddSet[sbase]
	LavishSettings[EQ Wanderbot]:AddSet[junk]

	sbase:Set[${LavishSettings[EQ Wanderbot].FindSet[sbase]}]
	junk:Set[${LavishSettings[EQ Wanderbot].FindSet[junk]}]

	; Load values from XML if present
	sbase:Import[${Script[Wanderbot].CurrentDirectory}/Require/Settings/Settings.xml]
	junk:Import[${Script[Wanderbot].CurrentDirectory}/Require/Settings/Junk.xml]

	; Set default values if values are not present
	MOVEFORWARD:Set[${sbase.FindSetting[MoveForward,num 8]}]
	MOVEBACKWARD:Set[${sbase.FindSetting[MoveBackward,num 2]}]
	STRAFELEFT:Set[${sbase.FindSetting[StrafeLeft,num 1]}]
	STRAFERIGHT:Set[${sbase.FindSetting[StrafeRight,num 3]}]
	TURNLEFT:Set[${sbase.FindSetting[TurnLeft,num 4]}]
	TURNRIGHT:Set[${sbase.FindSetting[TurnRight,num 6]}]
	Avatar.Loot:Set[${sbase.FindSetting[Loot,TRUE]}]
	Avatar.OnlyCash:Set[${sbase.FindSetting[OnlyCash,FALSE]}]
	Action.LogToFile:Set[${sbase.FindSetting[LogToFile,FALSE]}]

	; Make sure the proper checkboxes are checked
	if ${Avatar.Loot}
	{
		UIElement[EQ Wanderbot].FindUsableChild[chkLoot,checkbox]:SetChecked
	}

	if ${Avatar.OnlyCash}
	{
		UIElement[EQ Wanderbot].FindUsableChild[chkCash,checkbox]:SetChecked
	}

	if ${Action.LogToFile}
	{
		UIElement[EQ Wanderbot].FindUsableChild[chkLog,checkbox]:SetChecked
	}

	;LogFile Initialization
	LogDir:SetFilename[${Script[Wanderbot].CurrentDirectory}/Logs/${Me.Name}/${Time.Year}-${Time.Month}-${Time.Day}_${Time.Time24.Replace[:,REMOVE]}.txt]
	
	declare LogPath filepath local "${Script[Wanderbot].CurrentDirectory}/Logs/"
	declare CharPath filepath local "${Script[Wanderbot].CurrentDirectory}/Logs/${Me.Name}/"

	if ${CharPath.PathExists}
	{
		Return
	}
	else
	{
		LogPath:MakeSubdirectory[${Me.Name}]
	}

}
function StoreSettings()
{
	variable settingsetref sbase
	sbase:Set[${LavishSettings[EQ Wanderbot].FindSet[sbase]}]

	sbase.FindSetting[Loot]:Set[${Avatar.Loot}]
	sbase.FindSetting[OnlyCash]:Set[${Avatar.OnlyCash}]
	sbase.FindSetting[LogToFile]:Set[${Action.LogToFile}]

	sbase:Export[${Script[Wanderbot].CurrentDirectory}/Require/Settings/Settings.xml]

	LavishSettings[EQ Wanderbot]:Clear
	LavishSettings[EQ Wanderbot]:Remove
}